<extend name="Base/common"/>
<block name="style">
    <style type="text/css">
        .weui-form-preview{margin-bottom: 5px;}
        .weui-form-preview__hd{padding-bottom: 0;}
        .weui-form-preview__bd{padding-top: 0;}
        .weui-form-preview__item em.weui-form-preview__value{color: #000;}
    </style>
</block>
<block name="body">

    <notempty name="_list">
        <php>
            $LOAN_STATUS = C('LOAN_STATUS');
        </php>
        <foreach name="_list" item="vo" >

            <a href="{:U('loanview?id='.$vo['id'])}">
                <div class="weui-form-preview">
                    <div class="weui-form-preview__hd">
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">借款金额</label>
                            <em class="weui-form-preview__value">¥{$vo.money}</em>
                        </div>
                    </div>
                    <div class="weui-form-preview__bd">
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">合同单号</label>
                            <span class="weui-form-preview__value">{$vo.id}</span>
                        </div>
                        <div class="weui-form-preview__item">
                            <label class="weui-form-preview__label">借款状态</label>
                            <span class="weui-form-preview__value">{$LOAN_STATUS[$vo['status']]}</span>
                        </div>
                        <if condition="$vo['status'] eq 6">
                            <div class="weui-form-preview__item">
                                <label class="weui-form-preview__label">还款日期</label>
                                <span class="weui-form-preview__value">{$vo.expire_time|date='Y年m月d日',###}</span>
                            </div>
                            <elseif condition="$vo['status'] eq 5"/>
                            <div class="weui-form-preview__item">
                                <label class="weui-form-preview__label">还款期限</label>
                                <span class="weui-form-preview__value">{$vo.expire_time|date='Y年m月d日',###}</span>
                            </div>
                            <else />
                            <div class="weui-form-preview__item">
                                <label class="weui-form-preview__label">申请日期</label>
                                <span class="weui-form-preview__value">{$vo.create_time|date='Y年m月d日',###}</span>
                            </div>
                        </if>
                    </div>
                </div>
            </a>
        </foreach>
        <else/>
        <div class="page__bd">
            <div class="weui-loadmore weui-loadmore_line">
                <span class="weui-loadmore__tips">暂无借款</span>
            </div>
        </div>
    </notempty>
</block>
<block name="script">
    <script >


    </script>

</block>